From f9b43436a82493421eee03e45ffd07c42e8cab05 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Wed, 22 Sep 2010 18:26:01 +0100 Subject: [PATCH] xsm: return unlabeled instead of failing with ENOENT in get_page_sid It is better to return an unlabeled SID in the case where dsec is NULL instead of bailing out with an error. From: Daniel De Graaf Signed-off-by: Keir Fraser --- xen/xsm/flask/hooks.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/xen/xsm/flask/hooks.c b/xen/xsm/flask/hooks.c index c58f8d71b6..1b36a9e913 100644 --- a/xen/xsm/flask/hooks.c +++ b/xen/xsm/flask/hooks.c @@ -340,10 +340,7 @@ static int get_page_sid(struct page_info *page, u32 *sid) default: /*Pages are implicitly labeled by domain ownership!*/ dsec = d->ssid; - if (dsec) - *sid = dsec->sid; - else - rc = -ENOENT; + *sid = dsec ? dsec->sid : SECINITSID_UNLABELED; break; } -- 2.30.2